{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# About the course" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This course was originally written by [Thomas Robitaille](http://www.thomasrobitaille.com/teaching.html), and was carefully adapted by Robert Schmidt, Markus Demleitner and myself.\n", "\n", "**The web page for this course is\n", "http://wwwstaff.ari.uni-heidelberg.de/fschneider/teaching/py4sci.**\n", "\n", "The lecturer is [Fabian Schneider](http://www.fabian-schneider.com).\n", "You can contact me during the course and at [fabian.schneider@uni-heidelberg.de](mailto:fabian.schneider@uni-heidelberg.de)." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "Topics\n", "------\n", "\n", "- Using the Jupyter Notebook (formerly IPython Notebook)\n", "- Introduction to Python\n", "- Modules and Functions\n", "- Introduction to Numpy and Matplotlib\n", "- Reading/writing data from files\n", "- Introduction to Scipy (interpolation, integration, fitting)\n", "- Applying Python to scientific problems\n", "- Object-oriented programming\n", "- Parallel computing with Python" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "notes" } }, "source": [ "Structure\n", "---------\n", "\n", "The block course lasts five days, and each day will follow this schedule:\n", "\n", "* 9:00-10:30 - lecture/exercises\n", "* 10:30-11:00 - break\n", "* 11:00-12:30 - lecture/exercises\n", "* 12:30-13:30 - break for lunch\n", "* 13:30-14:30 - lecture/exercises\n", "* 14:30-17:00 - computer pool available to finish homework\n", "\n", "The lectures will be mixed with exercise sessions - from time to time you will work for 5 to 10 minutes on slelected tasks and exercises. There will be **problem sets** during the week, and you will be required to hand them in by a deadline indicated on the problem sheet. An average of 60% [=54 points] of the problem sets will be required to obtain 2 credits points at the end of the course.\n", "\n", "The course will be taught in English unless requested otherwise.\n", "\n", "I am happy to provide feedback and go over your code/solutions to the exercises." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "Solutions to problem sheets\n", "---------------------------" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "All solutions should be submitted as Jupyter (IPython) notebooks or python programs by email to [fabian.schneider@uni-heidelberg.de](mailto:fabian.schneider@uni-heidelberg.de) (one notebook/program per problem set per person).\n", "\n", "-> Please use a **filename that contains the name of the problem sheet and your name**.\n", "\n", "-> Only submit the program (.py or .ipynb), **do not submit data downloaded from the course web page**." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "The following criteria are taken into account for grading problem sets - the notebook/program should:\n", "\n", "- run with no errors using *python3*\n", "- produce the correct results\n", "- be clearly readable, and include text to explain what you are doing and why\n", "- not include any unused code! (-> readability)\n", "- be well presented\n", "\n", "Please make use of comments in your code to ensure that someone not familiar with the problem could read it and understand your solution." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**There is never a unique solution to a problem**, so it does not matter if your programs do not look the same as somebody else's! What matters most is that you get a chance to make mistakes and learn from them." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Policy on handing in solutions\n", "------------------------------\n", "\n", "**Problem set submissions need to be handed in separately for each participant.**\n", "\n", "The deadlines for the Problem Sets are:\n", "\n", "Problem Set 1 Thursday, 10th September 7pm CEST\n", "\n", "Problem Set 2 Monday, 14th September 7pm CEST\n", "\n", "Problem Set 3 Friday, 18th September 7pm CEST\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "Laptops\n", "-------\n", "\n", "If you would like to use Python on your laptop, you have basically two options:\n", "\n", "- If you have a Linux or Mac laptop and are familiar with package managers, most major scientific Python packages are available and sometimes pre-installed (however, not all packages used during the course are available by default)\n", "- **Recommended**: install the [Anaconda Python distribution](https://www.anaconda.com/distribution/) which is available for Windows, Mac and Linux\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Getting started" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### CIP Pool, the Jupyter server and the Lecture Notes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Unless you are using your own device, the default is to use the server **https://jupyter.kip.uni-heidelberg.de** for this course. Please try to login with your usual URZ account.\n", "\n", "You can download the notebooks of this course, the problem sets and the ancillary data files [here](http://wwwstaff.ari.uni-heidelberg.de/fschneider/teaching/py4sci).\n", "\n", "You then upload them to the **KIP Jupyter Server** using the 'upload' button. Some people found it helpful to create sub-folders for each day (e.g. 'day1', 'day2' etc.).\n", "\n", "Once uploaded, you can follow the lecture and work on the notebook.\n", "\n", "Alternatively, you can open a terminal on the Jupyter Server (klick on New -> Terminal), copy the full link to the Jupyter Notebook that you wish to upload from the above homepage and then execute ``wget ``. This will download the Jupyter Notebook file from the lecture homepage to the present working directory in the terminal." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Using iPython on the CIP pool computer directly" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It is also possible to run Python on the terminals/CIP computers. This approach appears slower than using the **Jupyter server**, so we do not recommend to do this.\n", "\n", "You will need to start up a command-line Terminal application. In the CIP pool this is located in the Anwendungen -> Zubehör -> Terminal menu.\n", "\n", "To ensure a common environment, in the CIP pool we'll be using an updated version of ipython over what is installed on the machines themselves. To use that, you have to manipulate your local path. Here is one way to do this:\n", "\n", " echo \"export PATH=/local/py4sci/anaconda3/bin:$PATH\" >> ~/.bashrc\n", " exec bash\n", "\n", "You only need to do this once.\n", "\n", "Then fetch the notebooks and execute the notebook player (optionally in a subdirectory):\n", "\n", " jupyter notebook\n", "\n", "A web browser should open and you should be ready to go.\n" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }